//
//  SwapCell.swift
//  Swift30Days
//
//  Created by licheng ke on 2017/3/16.
//  Copyright © 2017年 licheng ke. All rights reserved.
//

import UIKit

struct Pattern {
    let image: String
    let name: String
}

class SwapCell: UITableViewCell {

    @IBOutlet weak var myImageView: UIImageView!
    @IBOutlet weak var myLabel: UILabel!
    var pattern : Pattern?
    override func awakeFromNib() {
        super.awakeFromNib()

    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        if let obj = pattern {
            self.myImageView.image = UIImage(named: "t\(obj.image)")
            self.myLabel.text = obj.name
        }
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

    }
    
}
